import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    admin:sessionStorage.getItem('name')
  },
  getters: {
    
  },
  mutations: {
    getadmin(state,payLoad){
      state.admin=payLoad
      sessionStorage.setItem('name',payLoad)
      },
      logout(state){
        state.admin=undefined
        sessionStorage.removeItem('name')
      }
  },
  actions: {
  },
  modules: {
  }
})
